package com.wpw.java8demo;

public class YinYongTest {

	public static void main(String[] args) {
		Apple a = new Apple(1);
		System.out.println(a);
		doUpdate(a);
		System.out.println(a);
	}
	
	private static void doUpdate(Apple a) {
		a = new Apple(2);
		a.setWeigth(2);
		a.setColor("red");
		
	}
}
